import request from '@/utils/request'
// 获取部门列表
export function getdepartmentapi() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 负责人
export function getleaderapi() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}
// 新增部门
export function addpartmentapi(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 删除部门
export function deletpartmentapi(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

// 获取部门
export function getpartmentapi(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
// 编辑部门
export function editpartmentapi(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
